package com.example.task3.domain;

public class Cake {
    private String id;          // 商品ID
    private String name;        // 商品名称
    private double price;       // 商品价格
    private String imageUrl;    // 商品图片URL
    private String description; // 商品描述

    // 构造方法
    public Cake(String id, String name, double price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }

    public Cake(String id, String name, double price, String imageUrl, String description) {
        this(id, name, price);
        this.imageUrl = imageUrl;
        this.description = description;
    }

    // Getter和Setter方法
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return "Cake{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", price=" + price +
                '}';
    }
}
